import {get,post} from "./http"
// 判断管理员是否登录成功
export const getLoginStatus = (params)=>post(`admin/loginStatus`,params);
// ===========================歌手相关=========================
// 添加歌手
export const setSinger = (params)=>post(`singer/addSinger`,params);
// 查询歌手
export const queryAllSinger = ()=>post(`singer/queryAllSinger`);
//修改歌手
export const updateSinger = (params)=>post(`singer/updateSinger`,params);
// 删除歌手
export const deleteSinger = (id)=>post(`singer/deleteSinger?id=${id}`);
// =========================歌曲相关============================
// 根据歌手id查询歌曲
export const querySongBySingerId = (id)=>post(`song/querySongBySingerId?singerId=${id}`);
//修改歌曲
export const updateSong = (params)=>post(`song/updateSong`,params);
//删除歌曲
export const deleteSong = (id)=>post(`song/deleteSong?id=${id}`);
// 根据歌曲id查询歌曲对象
export const  querySongBySongId = (id)=>post(`song/querySongBySongId?songId=${id}`);
//根据歌曲名称获取歌曲对象
export const  querySongBySongName = (songName)=>post(`song/querySongBySongName?songName=${songName}`);
// 查询所有歌曲
export const queryAllSong = ()=>post(`song/queryAllSong`);
// ===========================歌单相关=========================
// 查询歌单
export const queryAllSongList = ()=>post(`songList/queryAllSongList`);
// 添加歌单
export const addSongList = (params)=>post(`songList/addSongList`,params);
//修改歌单
export const updateSongList = (params)=>post(`songList/updateSongList`,params);
// 删除歌单
export const deleteSongList = (id)=>post(`songList/deleteSongList?id=${id}`);
// ===========================歌单的歌曲相关=========================
// 根据歌单id查询歌曲
export const querySongBySongListId = (songListId)=>post(`ListSong/querySongBySongListId?songListId=${songListId}`);
//给歌单增加歌曲
export const addListSong = (params)=>post(`ListSong/addListSong`,params);
//删除歌单的歌曲
export const deleteBySongIdAndSongListId = (songId,songListId)=>post(`ListSong/deleteBySongIdAndSongListId?songId=${songId}&songListId=${songListId}`);

// ===========================用户相关=========================
// 添加用户
export const addConsumer = (params)=>post(`consumer/addConsumer`,params);
// 查询用户
export const queryAllConsumer = ()=>post(`consumer/queryAllConsumer`);
//修改用户
export const updateConsumer = (params)=>post(`consumer/updateConsumer`,params);
// 删除用户
export const deleteConsumer = (id)=>post(`consumer/deleteConsumer?id=${id}`);
// 查询单个用户
export const getConsumer = (id)=>post(`consumer/getConsumer?id=${id}`);


// =========================收藏==============================
//查询某个用户的收藏列表
export const queryCollectionByUserId = (userId)=>post(`collect/queryCollectionByUserId?userId=${userId}`);
//删除用户的收藏歌曲
export const deleteCollection = (userId,songId)=>post(`collect/deleteCollection?userId=${userId}&songId=${songId}`);

// ===============================评论=======================
// 查询歌单评论
export const queryBySongListId = (songListId)=>post(`comment/queryBySongListId?songListId=${songListId}`);
// 删除歌单下的评论
export const deleteComment = (id)=>post(`comment/deleteComment?id=${id}`);




